package com.lc.railway.util.eventbus;


import org.greenrobot.eventbus.EventBus;

/**
 * @author Kun
 * @date 2019/6/5 15:42
 * 说明 EventBus工具类
 */
public class EventBusUtils {

    public static void register(Object subscriber) {
        EventBus.getDefault().register(subscriber);
    }

    public static void unregister(Object subscriber) {
        EventBus.getDefault().unregister(subscriber);
    }

    public static void sendEvent(Event event) {
        EventBus.getDefault().post(event);
    }

    public static void sendStickyEvent(Event event) {
        EventBus.getDefault().postSticky(event);
    }
}
